<template>
	<div class="gmask">
		<!-- 未登录防止点击 -->
		<div class="globalMask" v-show="mshow"></div>
	</div>
</template>

<script>
	import {Toast} from 'mint-ui';
	export default {
		props: {
			mshow: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {}
		},
		mounted() {
			let that = this;
			console.log(that.mshow)
			if (that.mshow) {
				Toast({
		          message: '您还不是会员，快去注册吧！',
		          duration: 2000
		        });
		        setTimeout(function () {
					that.$router.push({path: '/register', query: {type: 'tpage'}});
		        }, 2000);
			}
		}
	}
</script>

<style lang="less">
/*未登录防止点击遮罩*/
.globalMask {
	width: 100%;
	height: 100vh;
	position: fixed;
	left: 0;
	top: 0;
	background-color: transparent;
	z-index: 9999;
}
</style>